package warmachineroster.service.validation;

import java.util.List;
import java.util.Map;

import warmachineroster.service.validation.calculators.TierStatus;
import warmachinesystem.BaseUnit;
import warmachinesystem.TierLevelType;

public class RosterValidationStatus {

	private int totalPointCost;
	
	private int rosterMax;
	
	private boolean validStructure;
	
	private TierStatus tierStatus;

	
	
	public RosterValidationStatus(int rosterMax) {
		this.rosterMax = rosterMax;
	}

	public int getTotalPointCost() {
		return totalPointCost;
	}

	public boolean isValidPointCost(){
		return totalPointCost <= rosterMax;
	}
	
	public boolean isValidStructure() {
		return validStructure;
	}
	
	public boolean isValid(){
		return isValidPointCost() && isValidStructure();
	}

	public List<BaseUnit> getOffendingUnits() {
		return tierStatus.getOffendingUnits();
	}

	public Map<BaseUnit, Integer> getFreeUnits() {
		return tierStatus.getFreeUnits();
	}

	public Map<BaseUnit, Integer> getUnitCostDelta() {
		return tierStatus.getUnitCostDelta();
	}

	public Map<BaseUnit, String> getUnitFaDelta() {
		return tierStatus.getUnitFaDelta();
	}

	public List<String> getIngameRules() {
		return tierStatus.getIngameRules();
	}

	public TierLevelType getCurrentTierLevel() {
		return tierStatus.getCurrentTierLevel();
	}
	
	protected void setTotalPointCost(int totalPointCost) {
		this.totalPointCost = totalPointCost;
	}

	protected void setValidStructure(boolean validStructure) {
		this.validStructure = validStructure;
	}

	public void setTierStatus(TierStatus tierStatus) {
		this.tierStatus = tierStatus;
		
	}
	
	
}
